home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFBIND / VGDETECT.S < prev    next >
Text File  |  1993-03-19  |  1KB  |  31 lines

  1. ;*========================================================================
  2. ;* VDIFAST Public Domain VDI bindings.
  3. ;*========================================================================
  4.  
  5.  
  6. ;*------------------------------------------------------------------------
  7. ;* vgd_detect() - Return TRUE/FALSE, indicating GDOS is/isn't installed.
  8. ;*
  9. ;* 09/04/92 - Chris Herborth
  10. ;*              Changed to take FSM-GDOS and GDOS clones into account:
  11. ;*              Now returns a long value.  "_FSM" for FSM-GDOS, non-zero
  12. ;*              for any other GDOS, zero if no GDOS is present.
  13. ;*------------------------------------------------------------------------
  14.  
  15.           .globl    _vgd_detect
  16.           .globl    _vq_gdos
  17.  
  18. _vq_gdos:                                ; lattice/gnu compatible name
  19. _vgd_detect:                            ; my old incompatible name
  20.  
  21.           moveq.l    #-2,d0         ; If we pass a -2 to trap #2, and it
  22.           trap        #2             ; comes back as -2, then GDOS is not
  23.           addq.l    #2,d0         ; installed.  We add 2, and if that comes out
  24.           beq.b     all_done     ; zero, no GDOS, we return the zero.  if it
  25.           subq.l    #2,d0         ; comes back as anything else, we adjust it
  26. all_done:                         ; back to its original value (in case it's
  27.           rts                     ; "_FSM" to indicate FSMGDOS), and return it.
  28.  
  29.           end
  30.  
  31.